﻿@model OnlineExam.Entities.Attendance


<div class="editor-label">
    @Html.LabelFor(model => model.StartedAt)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.StartedAt)
    @Html.ValidationMessageFor(model => model.StartedAt)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.EndedAt)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.EndedAt)
    @Html.ValidationMessageFor(model => model.EndedAt)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Status)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Status)
    @Html.ValidationMessageFor(model => model.Status)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Score)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Score)
    @Html.ValidationMessageFor(model => model.Score)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.CreatedAt)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.CreatedAt)
    @Html.ValidationMessageFor(model => model.CreatedAt)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.UpdatedAt)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.UpdatedAt)
    @Html.ValidationMessageFor(model => model.UpdatedAt)
</div>

<div class="editor-label">
    Exam
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ExamID, ((IEnumerable<OnlineExam.Entities.Exam>)ViewBag.PossibleExam).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.ExamID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.ExamID)
</div>
<div class="editor-label">
    User
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.UserID, ((IEnumerable<OnlineExam.Entities.User>)ViewBag.PossibleUser).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.UserID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.UserID)
</div>
